﻿
#region USING STATEMENTS

using Microsoft.Xna.Framework.Graphics; // For Texture2D
using Microsoft.Xna.Framework; // For Vector2

#endregion USING STATEMENTS

namespace Gsp315_AIBehaviors
{
    public class Background
    {
        #region DATA MEMBERS

        private Texture2D texture;
        private Vector2 position;
        private Vector2 size;
        private Vector2 scale;

        #endregion DATA MEMBERS



        #region OBJECT CONSTRUCTION

        public Background(Texture2D newTexture)
        {
            texture = newTexture;
            position = new Vector2(0, 0);
            scale = new Vector2(1, 1);
        }// end Constructor()

        //public Background(Texture2D newTexture, Vector2 size)
        //{
        //    texture = newTexture;
        //    position = new Vector2(0, 0);
        //    this.size = size;
        //    scale = new Vector2((BBGlobalConfig.getWindowWidth() / size.X), (BBGlobalConfig.getWindowHeight() / size.Y));
        //}// end Overloaded Constructor 1()

        public Background(Texture2D newTexture, Vector2 position, Vector2 size)
        {
            texture = newTexture;
            this.position = position;
            this.size = size;
            scale = new Vector2(1, 1);//new Vector2((BBGlobalConfig.getWindowWidth() / size.X), (BBGlobalConfig.getWindowHeight() / size.Y));
        }// end Overloaded Constructor 2()

        #endregion OBJECT CONSTRUCTION



        #region PROPERTIES

        public Texture2D Texture
        {
            get{ return texture; }
            set{ texture = value; }
        }

        public Vector2 Position
        {
            get{ return position; }
            set{ position = value; }
        }

        public Vector2 Size
        {
            get { return size; }
            set { size = value; }
        }

        #endregion PROPERTIES



        #region PUBLIC METHODS

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(texture, position, null, Color.White, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f);
        }// end Draw() 

        #endregion PUBLIC METHODS     
    }// end class
}// end namespace
